In many types of printers, such as the HP DeskJet 1200C printer, control and display information from the host computer to the printer is provided in a high level page description language and then converted by the printer into a raster scan type format. The printer then applies the data in the raster scan format to the print engine for printing on a medium. Since the printer, and not the host computer, performs the processing of the high level commands, the computer is able to more quickly support the user.
A page to be printed must be first stored in the printer as a display list or stored as individual pixels in a frame buffer. The article, "Connectivity of the HP DeskJet 1200C Printer," by Anthony Parkhurst et al., Hewlett-Packard Journal, February 1994, pages 85-97, describes this well known interface between a host computer and the HP DeskJet 1200C color printer. This article is incorporated herein by reference. Such an interface is similar to the interface used by other printers.
The HP DeskJet 1200C is a color inkjet type printer using a black pen, a cyan pen, a magenta pen, and a yellow pen. Drops of black ink or color ink are emitted by the inkjet printheads to form dots or pixels on the medium. These dots are closely spaced, or overlapping, and the individual dots are indistinguishable from one another. Many colors are created by the various combinations of cyan, magenta, and yellow ink.
The page description language transmitted to the printer describes shapes to be displayed using coordinates and primitives such as rectangles, vectors, circles, or polygons. Text is described by designating characters and fonts rather than describing the appearance of the characters. The page description language also describes operations to be performed on the shapes, such as filling a shape with a particular pattern or color. Such a page description language is in contrast to a simple pixel-by-pixel description, where each pixel to be printed is transmitted to the printer in a raster scan order, although such a transmission in raster scan format is permitted in conjunction with the high level language. One well known page description language is the PCL-5C language, which is described in detail in the Hewlett-Packard publication entitled "PCL 5 Printer Language Technical Reference Manual," Manual Part No. 5961-0509, 1992, incorporated herein by reference. A programmer who is developing a graphics program may use such a PCL-5 language to define the images to be displayed. Other page description languages include PostScript and HP-GL/2, among others.
The amount of memory required in the printer and the time it takes to successfully render and print a page is directly proportional to the complexity of the page description. The memory capacity in the HP DeskJet 1200C is 2 megabytes but is expandable to up to 26 megabytes for more complex graphics.
Graphics application programs for personal computers have made it easy for users to apply fills to text, arbitrary objects, and backdrops. For example, for a gradient fill, the user has to just choose a beginning color, an end color, and the nature of the gradient, such as linear, angular, radial, or conical. Once the gradient is defined, it can be applied to any text or graphics object to fill in the text or object with the gradient pattern previously defined. Many applications dealing with presentation graphics now have full-screen gradients available as standard backdrops.
While graphical user interfaces (GUI), such as a menu driven display used in conjunction with a mouse, have made fills easily available for end users, there is no standard way of internally representing and implementing the fills. This makes it a non-trivial task for the printer drivers (used to interface a particular printer with a variety of application programs in the host computer) and page description languages to support the variety of filling or shading techniques used by the various application programs.
Several prominent software applications involving graphics displays use a three-step raster operation (ROP) process to fill in arbitrarily shaped objects with a solid fill or a patterned fill. A ROP is a logical operation performed on image data. The example of a gradient fill of an arbitrary shape will be used as an illustration in FIG. 1.
FIGS. 1A-1C illustrate a conventional ROP process for creating an oval having a gradient fill. The process creates the gradient fill without changing any portion of the display outside of the boundaries of the arbitrary shape. In FIGS. 1A-1C, it is assumed that the initial background is a color X background 10 which is stored in a display list or frame buffer.
The user creates an arbitrary shape by, for example, drawing an outline of the shape using a mouse in conjunction with a conventional graphics program. This arbitrary shape may also be any object automatically created by the application program. It will be assumed that the arbitrary shape is an oval.
The user next selects the desired fill for the arbitrary shape, which we will assume is a gradient pattern 12 of color Y.
A three-step ROP process is then performed to now fill in the arbitrary shape with the selected fill pattern.
In the first step (FIG. 1A) of this three-step process, the pixels in the background 10 destination area are exclusively ORed (XOR) with the gradient fill pattern 12. This step is designated ROP 90 in the page description language. This will produce an intermediate gradient pattern 14 of color Z in the destination area.
In step two (FIG. 1B), the previously created arbitrary shape is copied as a monochrome mask 16 into the destination area (in either a display list or a frame buffer) to replace the corresponding pixels in the destination area, as illustrated by pattern 18. This copy step is designated ROP 240.
In step three (FIG. 1C), all of the pixels in the destination area pattern 18 are then XORed with the gradient pattern 12 using the ROP 90 instruction again. The result of step three is that the portions outside of the mask 16 will be converted to the original display background 10, while the pixels within the mask 16 will be converted to the gradient pattern 12. The resulting masked gradient pattern 12 is then printed or otherwise displayed.
The above three-step process requires the gradient pattern 12 to be transmitted twice, and requires sufficient memory in the printer to store this gradient pattern twice. If the fill pattern were a complex raster image (e.g., a picture), much more memory would be required to store this image.
It would be desirable to implement a fill process performed by a printer or computer which requires less memory and less complexity than the three-step ROP process described with respect to FIGS. 1A-1C and which is practical and inexpensive to implement.